3.425 \(\int (a+a \sin (e+f x)) (c+d \sin (e+f x))^4 \, dx\)

Optimal. Leaf size=227 \[ -\frac {a \left (12 c^2+35 c d+16 d^2\right ) \cos (e+f x) (c+d \sin (e+f x))^2}{60 f}-\frac {a d \left (24 c^3+130 c^2 d+116 c d^2+45 d^3\right ) \sin (e+f x) \cos (e+f x)}{120 f}-\frac {a \left (12 c^4+95 c^3 d+112 c^2 d^2+80 c d^3+16 d^4\right ) \cos (e+f x)}{30 f}+\frac {1}{8} a x \left (8 c^4+16 c^3 d+24 c^2 d^2+12 c d^3+3 d^4\right )-\frac {a \cos (e+f x) (c+d \sin (e+f x))^4}{5 f}-\frac {a (4 c+5 d) \cos (e+f x) (c+d \sin (e+f x))^3}{20 f} \]

[Out]

1/8*a*(8*c^4+16*c^3*d+24*c^2*d^2+12*c*d^3+3*d^4)*x-1/30*a*(12*c^4+95*c^3*d+112*c^2*d^2+80*c*d^3+16*d^4)*cos(f*
x+e)/f-1/120*a*d*(24*c^3+130*c^2*d+116*c*d^2+45*d^3)*cos(f*x+e)*sin(f*x+e)/f-1/60*a*(12*c^2+35*c*d+16*d^2)*cos
(f*x+e)*(c+d*sin(f*x+e))^2/f-1/20*a*(4*c+5*d)*cos(f*x+e)*(c+d*sin(f*x+e))^3/f-1/5*a*cos(f*x+e)*(c+d*sin(f*x+e)
)^4/f

________________________________________________________________________________________

Rubi [A]  time = 0.28, antiderivative size = 227, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 2, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.087, Rules used = {2753, 2734} \[ -\frac {a \left (112 c^2 d^2+95 c^3 d+12 c^4+80 c d^3+16 d^4\right ) \cos (e+f x)}{30 f}-\frac {a \left (12 c^2+35 c d+16 d^2\right ) \cos (e+f x) (c+d \sin (e+f x))^2}{60 f}-\frac {a d \left (130 c^2 d+24 c^3+116 c d^2+45 d^3\right ) \sin (e+f x) \cos (e+f x)}{120 f}+\frac {1}{8} a x \left (24 c^2 d^2+16 c^3 d+8 c^4+12 c d^3+3 d^4\right )-\frac {a \cos (e+f x) (c+d \sin (e+f x))^4}{5 f}-\frac {a (4 c+5 d) \cos (e+f x) (c+d \sin (e+f x))^3}{20 f} \]

Antiderivative was successfully verified.

[In]

Int[(a + a*Sin[e + f*x])*(c + d*Sin[e + f*x])^4,x]

[Out]

(a*(8*c^4 + 16*c^3*d + 24*c^2*d^2 + 12*c*d^3 + 3*d^4)*x)/8 - (a*(12*c^4 + 95*c^3*d + 112*c^2*d^2 + 80*c*d^3 +
16*d^4)*Cos[e + f*x])/(30*f) - (a*d*(24*c^3 + 130*c^2*d + 116*c*d^2 + 45*d^3)*Cos[e + f*x]*Sin[e + f*x])/(120*
f) - (a*(12*c^2 + 35*c*d + 16*d^2)*Cos[e + f*x]*(c + d*Sin[e + f*x])^2)/(60*f) - (a*(4*c + 5*d)*Cos[e + f*x]*(
c + d*Sin[e + f*x])^3)/(20*f) - (a*Cos[e + f*x]*(c + d*Sin[e + f*x])^4)/(5*f)

Rule 2734

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[((2*a*c
+ b*d)*x)/2, x] + (-Simp[((b*c + a*d)*Cos[e + f*x])/f, x] - Simp[(b*d*Cos[e + f*x]*Sin[e + f*x])/(2*f), x]) /;
 FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0]

Rule 2753

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> -Simp[(d
*Cos[e + f*x]*(a + b*Sin[e + f*x])^m)/(f*(m + 1)), x] + Dist[1/(m + 1), Int[(a + b*Sin[e + f*x])^(m - 1)*Simp[
b*d*m + a*c*(m + 1) + (a*d*m + b*c*(m + 1))*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*
c - a*d, 0] && NeQ[a^2 - b^2, 0] && GtQ[m, 0] && IntegerQ[2*m]

Rubi steps

\begin {align*} \int (a+a \sin (e+f x)) (c+d \sin (e+f x))^4 \, dx &=-\frac {a \cos (e+f x) (c+d \sin (e+f x))^4}{5 f}+\frac {1}{5} \int (c+d \sin (e+f x))^3 (a (5 c+4 d)+a (4 c+5 d) \sin (e+f x)) \, dx\\ &=-\frac {a (4 c+5 d) \cos (e+f x) (c+d \sin (e+f x))^3}{20 f}-\frac {a \cos (e+f x) (c+d \sin (e+f x))^4}{5 f}+\frac {1}{20} \int (c+d \sin (e+f x))^2 \left (a \left (20 c^2+28 c d+15 d^2\right )+a \left (12 c^2+35 c d+16 d^2\right ) \sin (e+f x)\right ) \, dx\\ &=-\frac {a \left (12 c^2+35 c d+16 d^2\right ) \cos (e+f x) (c+d \sin (e+f x))^2}{60 f}-\frac {a (4 c+5 d) \cos (e+f x) (c+d \sin (e+f x))^3}{20 f}-\frac {a \cos (e+f x) (c+d \sin (e+f x))^4}{5 f}+\frac {1}{60} \int (c+d \sin (e+f x)) \left (a \left (60 c^3+108 c^2 d+115 c d^2+32 d^3\right )+a \left (24 c^3+130 c^2 d+116 c d^2+45 d^3\right ) \sin (e+f x)\right ) \, dx\\ &=\frac {1}{8} a \left (8 c^4+16 c^3 d+24 c^2 d^2+12 c d^3+3 d^4\right ) x-\frac {a \left (12 c^4+95 c^3 d+112 c^2 d^2+80 c d^3+16 d^4\right ) \cos (e+f x)}{30 f}-\frac {a d \left (24 c^3+130 c^2 d+116 c d^2+45 d^3\right ) \cos (e+f x) \sin (e+f x)}{120 f}-\frac {a \left (12 c^2+35 c d+16 d^2\right ) \cos (e+f x) (c+d \sin (e+f x))^2}{60 f}-\frac {a (4 c+5 d) \cos (e+f x) (c+d \sin (e+f x))^3}{20 f}-\frac {a \cos (e+f x) (c+d \sin (e+f x))^4}{5 f}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 1.36, size = 207, normalized size = 0.91 \[ \frac {a (\sin (e+f x)+1) \left (10 d^2 \left (24 c^2+16 c d+5 d^2\right ) \cos (3 (e+f x))+15 \left (-8 d \left (4 c^3+6 c^2 d+4 c d^2+d^3\right ) \sin (2 (e+f x))+4 f x \left (8 c^4+16 c^3 d+24 c^2 d^2+12 c d^3+3 d^4\right )+d^3 (4 c+d) \sin (4 (e+f x))\right )-60 \left (8 c^4+32 c^3 d+36 c^2 d^2+24 c d^3+5 d^4\right ) \cos (e+f x)-6 d^4 \cos (5 (e+f x))\right )}{480 f \left (\sin \left (\frac {1}{2} (e+f x)\right )+\cos \left (\frac {1}{2} (e+f x)\right )\right )^2} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + a*Sin[e + f*x])*(c + d*Sin[e + f*x])^4,x]

[Out]

(a*(1 + Sin[e + f*x])*(-60*(8*c^4 + 32*c^3*d + 36*c^2*d^2 + 24*c*d^3 + 5*d^4)*Cos[e + f*x] + 10*d^2*(24*c^2 +
16*c*d + 5*d^2)*Cos[3*(e + f*x)] - 6*d^4*Cos[5*(e + f*x)] + 15*(4*(8*c^4 + 16*c^3*d + 24*c^2*d^2 + 12*c*d^3 +
3*d^4)*f*x - 8*d*(4*c^3 + 6*c^2*d + 4*c*d^2 + d^3)*Sin[2*(e + f*x)] + d^3*(4*c + d)*Sin[4*(e + f*x)])))/(480*f
*(Cos[(e + f*x)/2] + Sin[(e + f*x)/2])^2)

________________________________________________________________________________________

fricas [A]  time = 0.47, size = 204, normalized size = 0.90 \[ -\frac {24 \, a d^{4} \cos \left (f x + e\right )^{5} - 80 \, {\left (3 \, a c^{2} d^{2} + 2 \, a c d^{3} + a d^{4}\right )} \cos \left (f x + e\right )^{3} - 15 \, {\left (8 \, a c^{4} + 16 \, a c^{3} d + 24 \, a c^{2} d^{2} + 12 \, a c d^{3} + 3 \, a d^{4}\right )} f x + 120 \, {\left (a c^{4} + 4 \, a c^{3} d + 6 \, a c^{2} d^{2} + 4 \, a c d^{3} + a d^{4}\right )} \cos \left (f x + e\right ) - 15 \, {\left (2 \, {\left (4 \, a c d^{3} + a d^{4}\right )} \cos \left (f x + e\right )^{3} - {\left (16 \, a c^{3} d + 24 \, a c^{2} d^{2} + 20 \, a c d^{3} + 5 \, a d^{4}\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{120 \, f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(f*x+e))*(c+d*sin(f*x+e))^4,x, algorithm="fricas")

[Out]

-1/120*(24*a*d^4*cos(f*x + e)^5 - 80*(3*a*c^2*d^2 + 2*a*c*d^3 + a*d^4)*cos(f*x + e)^3 - 15*(8*a*c^4 + 16*a*c^3
*d + 24*a*c^2*d^2 + 12*a*c*d^3 + 3*a*d^4)*f*x + 120*(a*c^4 + 4*a*c^3*d + 6*a*c^2*d^2 + 4*a*c*d^3 + a*d^4)*cos(
f*x + e) - 15*(2*(4*a*c*d^3 + a*d^4)*cos(f*x + e)^3 - (16*a*c^3*d + 24*a*c^2*d^2 + 20*a*c*d^3 + 5*a*d^4)*cos(f
*x + e))*sin(f*x + e))/f

________________________________________________________________________________________

giac [A]  time = 0.18, size = 272, normalized size = 1.20 \[ -\frac {a d^{4} \cos \left (5 \, f x + 5 \, e\right )}{80 \, f} + \frac {a c d^{3} \cos \left (3 \, f x + 3 \, e\right )}{3 \, f} + \frac {a c d^{3} \sin \left (4 \, f x + 4 \, e\right )}{8 \, f} + \frac {a d^{4} \sin \left (4 \, f x + 4 \, e\right )}{32 \, f} + \frac {1}{8} \, {\left (8 \, a c^{4} + 24 \, a c^{2} d^{2} + 3 \, a d^{4}\right )} x + \frac {1}{2} \, {\left (4 \, a c^{3} d + 3 \, a c d^{3}\right )} x + \frac {{\left (24 \, a c^{2} d^{2} + 5 \, a d^{4}\right )} \cos \left (3 \, f x + 3 \, e\right )}{48 \, f} - \frac {{\left (8 \, a c^{4} + 36 \, a c^{2} d^{2} + 5 \, a d^{4}\right )} \cos \left (f x + e\right )}{8 \, f} - \frac {{\left (4 \, a c^{3} d + 3 \, a c d^{3}\right )} \cos \left (f x + e\right )}{f} - \frac {{\left (a c^{3} d + a c d^{3}\right )} \sin \left (2 \, f x + 2 \, e\right )}{f} - \frac {{\left (6 \, a c^{2} d^{2} + a d^{4}\right )} \sin \left (2 \, f x + 2 \, e\right )}{4 \, f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(f*x+e))*(c+d*sin(f*x+e))^4,x, algorithm="giac")

[Out]

-1/80*a*d^4*cos(5*f*x + 5*e)/f + 1/3*a*c*d^3*cos(3*f*x + 3*e)/f + 1/8*a*c*d^3*sin(4*f*x + 4*e)/f + 1/32*a*d^4*
sin(4*f*x + 4*e)/f + 1/8*(8*a*c^4 + 24*a*c^2*d^2 + 3*a*d^4)*x + 1/2*(4*a*c^3*d + 3*a*c*d^3)*x + 1/48*(24*a*c^2
*d^2 + 5*a*d^4)*cos(3*f*x + 3*e)/f - 1/8*(8*a*c^4 + 36*a*c^2*d^2 + 5*a*d^4)*cos(f*x + e)/f - (4*a*c^3*d + 3*a*
c*d^3)*cos(f*x + e)/f - (a*c^3*d + a*c*d^3)*sin(2*f*x + 2*e)/f - 1/4*(6*a*c^2*d^2 + a*d^4)*sin(2*f*x + 2*e)/f

________________________________________________________________________________________

maple [A]  time = 0.33, size = 259, normalized size = 1.14 \[ \frac {-a \,c^{4} \cos \left (f x +e \right )+4 a \,c^{3} d \left (-\frac {\sin \left (f x +e \right ) \cos \left (f x +e \right )}{2}+\frac {f x}{2}+\frac {e}{2}\right )-2 a \,c^{2} d^{2} \left (2+\sin ^{2}\left (f x +e \right )\right ) \cos \left (f x +e \right )+4 a c \,d^{3} \left (-\frac {\left (\sin ^{3}\left (f x +e \right )+\frac {3 \sin \left (f x +e \right )}{2}\right ) \cos \left (f x +e \right )}{4}+\frac {3 f x}{8}+\frac {3 e}{8}\right )-\frac {a \,d^{4} \left (\frac {8}{3}+\sin ^{4}\left (f x +e \right )+\frac {4 \left (\sin ^{2}\left (f x +e \right )\right )}{3}\right ) \cos \left (f x +e \right )}{5}+a \,c^{4} \left (f x +e \right )-4 a \,c^{3} d \cos \left (f x +e \right )+6 a \,c^{2} d^{2} \left (-\frac {\sin \left (f x +e \right ) \cos \left (f x +e \right )}{2}+\frac {f x}{2}+\frac {e}{2}\right )-\frac {4 a c \,d^{3} \left (2+\sin ^{2}\left (f x +e \right )\right ) \cos \left (f x +e \right )}{3}+a \,d^{4} \left (-\frac {\left (\sin ^{3}\left (f x +e \right )+\frac {3 \sin \left (f x +e \right )}{2}\right ) \cos \left (f x +e \right )}{4}+\frac {3 f x}{8}+\frac {3 e}{8}\right )}{f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+a*sin(f*x+e))*(c+d*sin(f*x+e))^4,x)

[Out]

1/f*(-a*c^4*cos(f*x+e)+4*a*c^3*d*(-1/2*sin(f*x+e)*cos(f*x+e)+1/2*f*x+1/2*e)-2*a*c^2*d^2*(2+sin(f*x+e)^2)*cos(f
*x+e)+4*a*c*d^3*(-1/4*(sin(f*x+e)^3+3/2*sin(f*x+e))*cos(f*x+e)+3/8*f*x+3/8*e)-1/5*a*d^4*(8/3+sin(f*x+e)^4+4/3*
sin(f*x+e)^2)*cos(f*x+e)+a*c^4*(f*x+e)-4*a*c^3*d*cos(f*x+e)+6*a*c^2*d^2*(-1/2*sin(f*x+e)*cos(f*x+e)+1/2*f*x+1/
2*e)-4/3*a*c*d^3*(2+sin(f*x+e)^2)*cos(f*x+e)+a*d^4*(-1/4*(sin(f*x+e)^3+3/2*sin(f*x+e))*cos(f*x+e)+3/8*f*x+3/8*
e))

________________________________________________________________________________________

maxima [A]  time = 0.39, size = 250, normalized size = 1.10 \[ \frac {480 \, {\left (f x + e\right )} a c^{4} + 480 \, {\left (2 \, f x + 2 \, e - \sin \left (2 \, f x + 2 \, e\right )\right )} a c^{3} d + 960 \, {\left (\cos \left (f x + e\right )^{3} - 3 \, \cos \left (f x + e\right )\right )} a c^{2} d^{2} + 720 \, {\left (2 \, f x + 2 \, e - \sin \left (2 \, f x + 2 \, e\right )\right )} a c^{2} d^{2} + 640 \, {\left (\cos \left (f x + e\right )^{3} - 3 \, \cos \left (f x + e\right )\right )} a c d^{3} + 60 \, {\left (12 \, f x + 12 \, e + \sin \left (4 \, f x + 4 \, e\right ) - 8 \, \sin \left (2 \, f x + 2 \, e\right )\right )} a c d^{3} - 32 \, {\left (3 \, \cos \left (f x + e\right )^{5} - 10 \, \cos \left (f x + e\right )^{3} + 15 \, \cos \left (f x + e\right )\right )} a d^{4} + 15 \, {\left (12 \, f x + 12 \, e + \sin \left (4 \, f x + 4 \, e\right ) - 8 \, \sin \left (2 \, f x + 2 \, e\right )\right )} a d^{4} - 480 \, a c^{4} \cos \left (f x + e\right ) - 1920 \, a c^{3} d \cos \left (f x + e\right )}{480 \, f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(f*x+e))*(c+d*sin(f*x+e))^4,x, algorithm="maxima")

[Out]

1/480*(480*(f*x + e)*a*c^4 + 480*(2*f*x + 2*e - sin(2*f*x + 2*e))*a*c^3*d + 960*(cos(f*x + e)^3 - 3*cos(f*x +
e))*a*c^2*d^2 + 720*(2*f*x + 2*e - sin(2*f*x + 2*e))*a*c^2*d^2 + 640*(cos(f*x + e)^3 - 3*cos(f*x + e))*a*c*d^3
 + 60*(12*f*x + 12*e + sin(4*f*x + 4*e) - 8*sin(2*f*x + 2*e))*a*c*d^3 - 32*(3*cos(f*x + e)^5 - 10*cos(f*x + e)
^3 + 15*cos(f*x + e))*a*d^4 + 15*(12*f*x + 12*e + sin(4*f*x + 4*e) - 8*sin(2*f*x + 2*e))*a*d^4 - 480*a*c^4*cos
(f*x + e) - 1920*a*c^3*d*cos(f*x + e))/f

________________________________________________________________________________________

mupad [B]  time = 9.94, size = 559, normalized size = 2.46 \[ \frac {a\,\mathrm {atan}\left (\frac {a\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\,\left (8\,c^4+16\,c^3\,d+24\,c^2\,d^2+12\,c\,d^3+3\,d^4\right )}{4\,\left (2\,a\,c^4+4\,a\,c^3\,d+6\,a\,c^2\,d^2+3\,a\,c\,d^3+\frac {3\,a\,d^4}{4}\right )}\right )\,\left (8\,c^4+16\,c^3\,d+24\,c^2\,d^2+12\,c\,d^3+3\,d^4\right )}{4\,f}-\frac {{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2\,\left (8\,a\,c^4+32\,a\,c^3\,d+40\,a\,c^2\,d^2+\frac {80\,a\,c\,d^3}{3}+\frac {16\,a\,d^4}{3}\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4\,\left (12\,a\,c^4+48\,a\,c^3\,d+56\,a\,c^2\,d^2+\frac {112\,a\,c\,d^3}{3}+\frac {32\,a\,d^4}{3}\right )+\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\,\left (4\,a\,c^3\,d+6\,a\,c^2\,d^2+3\,a\,c\,d^3+\frac {3\,a\,d^4}{4}\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^8\,\left (2\,a\,c^4+8\,a\,d\,c^3\right )+2\,a\,c^4+\frac {16\,a\,d^4}{15}+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^6\,\left (8\,a\,c^4+32\,a\,c^3\,d+24\,a\,c^2\,d^2+16\,a\,c\,d^3\right )-{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^9\,\left (4\,a\,c^3\,d+6\,a\,c^2\,d^2+3\,a\,c\,d^3+\frac {3\,a\,d^4}{4}\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3\,\left (8\,a\,c^3\,d+12\,a\,c^2\,d^2+14\,a\,c\,d^3+\frac {7\,a\,d^4}{2}\right )-{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^7\,\left (8\,a\,c^3\,d+12\,a\,c^2\,d^2+14\,a\,c\,d^3+\frac {7\,a\,d^4}{2}\right )+8\,a\,c^2\,d^2+\frac {16\,a\,c\,d^3}{3}+8\,a\,c^3\,d}{f\,\left ({\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^{10}+5\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^8+10\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^6+10\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4+5\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2+1\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + a*sin(e + f*x))*(c + d*sin(e + f*x))^4,x)

[Out]

(a*atan((a*tan(e/2 + (f*x)/2)*(12*c*d^3 + 16*c^3*d + 8*c^4 + 3*d^4 + 24*c^2*d^2))/(4*(2*a*c^4 + (3*a*d^4)/4 +
6*a*c^2*d^2 + 3*a*c*d^3 + 4*a*c^3*d)))*(12*c*d^3 + 16*c^3*d + 8*c^4 + 3*d^4 + 24*c^2*d^2))/(4*f) - (tan(e/2 +
(f*x)/2)^2*(8*a*c^4 + (16*a*d^4)/3 + 40*a*c^2*d^2 + (80*a*c*d^3)/3 + 32*a*c^3*d) + tan(e/2 + (f*x)/2)^4*(12*a*
c^4 + (32*a*d^4)/3 + 56*a*c^2*d^2 + (112*a*c*d^3)/3 + 48*a*c^3*d) + tan(e/2 + (f*x)/2)*((3*a*d^4)/4 + 6*a*c^2*
d^2 + 3*a*c*d^3 + 4*a*c^3*d) + tan(e/2 + (f*x)/2)^8*(2*a*c^4 + 8*a*c^3*d) + 2*a*c^4 + (16*a*d^4)/15 + tan(e/2
+ (f*x)/2)^6*(8*a*c^4 + 24*a*c^2*d^2 + 16*a*c*d^3 + 32*a*c^3*d) - tan(e/2 + (f*x)/2)^9*((3*a*d^4)/4 + 6*a*c^2*
d^2 + 3*a*c*d^3 + 4*a*c^3*d) + tan(e/2 + (f*x)/2)^3*((7*a*d^4)/2 + 12*a*c^2*d^2 + 14*a*c*d^3 + 8*a*c^3*d) - ta
n(e/2 + (f*x)/2)^7*((7*a*d^4)/2 + 12*a*c^2*d^2 + 14*a*c*d^3 + 8*a*c^3*d) + 8*a*c^2*d^2 + (16*a*c*d^3)/3 + 8*a*
c^3*d)/(f*(5*tan(e/2 + (f*x)/2)^2 + 10*tan(e/2 + (f*x)/2)^4 + 10*tan(e/2 + (f*x)/2)^6 + 5*tan(e/2 + (f*x)/2)^8
 + tan(e/2 + (f*x)/2)^10 + 1))

________________________________________________________________________________________

sympy [A]  time = 6.57, size = 580, normalized size = 2.56 \[ \begin {cases} a c^{4} x - \frac {a c^{4} \cos {\left (e + f x \right )}}{f} + 2 a c^{3} d x \sin ^{2}{\left (e + f x \right )} + 2 a c^{3} d x \cos ^{2}{\left (e + f x \right )} - \frac {2 a c^{3} d \sin {\left (e + f x \right )} \cos {\left (e + f x \right )}}{f} - \frac {4 a c^{3} d \cos {\left (e + f x \right )}}{f} + 3 a c^{2} d^{2} x \sin ^{2}{\left (e + f x \right )} + 3 a c^{2} d^{2} x \cos ^{2}{\left (e + f x \right )} - \frac {6 a c^{2} d^{2} \sin ^{2}{\left (e + f x \right )} \cos {\left (e + f x \right )}}{f} - \frac {3 a c^{2} d^{2} \sin {\left (e + f x \right )} \cos {\left (e + f x \right )}}{f} - \frac {4 a c^{2} d^{2} \cos ^{3}{\left (e + f x \right )}}{f} + \frac {3 a c d^{3} x \sin ^{4}{\left (e + f x \right )}}{2} + 3 a c d^{3} x \sin ^{2}{\left (e + f x \right )} \cos ^{2}{\left (e + f x \right )} + \frac {3 a c d^{3} x \cos ^{4}{\left (e + f x \right )}}{2} - \frac {5 a c d^{3} \sin ^{3}{\left (e + f x \right )} \cos {\left (e + f x \right )}}{2 f} - \frac {4 a c d^{3} \sin ^{2}{\left (e + f x \right )} \cos {\left (e + f x \right )}}{f} - \frac {3 a c d^{3} \sin {\left (e + f x \right )} \cos ^{3}{\left (e + f x \right )}}{2 f} - \frac {8 a c d^{3} \cos ^{3}{\left (e + f x \right )}}{3 f} + \frac {3 a d^{4} x \sin ^{4}{\left (e + f x \right )}}{8} + \frac {3 a d^{4} x \sin ^{2}{\left (e + f x \right )} \cos ^{2}{\left (e + f x \right )}}{4} + \frac {3 a d^{4} x \cos ^{4}{\left (e + f x \right )}}{8} - \frac {a d^{4} \sin ^{4}{\left (e + f x \right )} \cos {\left (e + f x \right )}}{f} - \frac {5 a d^{4} \sin ^{3}{\left (e + f x \right )} \cos {\left (e + f x \right )}}{8 f} - \frac {4 a d^{4} \sin ^{2}{\left (e + f x \right )} \cos ^{3}{\left (e + f x \right )}}{3 f} - \frac {3 a d^{4} \sin {\left (e + f x \right )} \cos ^{3}{\left (e + f x \right )}}{8 f} - \frac {8 a d^{4} \cos ^{5}{\left (e + f x \right )}}{15 f} & \text {for}\: f \neq 0 \\x \left (c + d \sin {\relax (e )}\right )^{4} \left (a \sin {\relax (e )} + a\right ) & \text {otherwise} \end {cases} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(f*x+e))*(c+d*sin(f*x+e))**4,x)

[Out]

Piecewise((a*c**4*x - a*c**4*cos(e + f*x)/f + 2*a*c**3*d*x*sin(e + f*x)**2 + 2*a*c**3*d*x*cos(e + f*x)**2 - 2*
a*c**3*d*sin(e + f*x)*cos(e + f*x)/f - 4*a*c**3*d*cos(e + f*x)/f + 3*a*c**2*d**2*x*sin(e + f*x)**2 + 3*a*c**2*
d**2*x*cos(e + f*x)**2 - 6*a*c**2*d**2*sin(e + f*x)**2*cos(e + f*x)/f - 3*a*c**2*d**2*sin(e + f*x)*cos(e + f*x
)/f - 4*a*c**2*d**2*cos(e + f*x)**3/f + 3*a*c*d**3*x*sin(e + f*x)**4/2 + 3*a*c*d**3*x*sin(e + f*x)**2*cos(e +
f*x)**2 + 3*a*c*d**3*x*cos(e + f*x)**4/2 - 5*a*c*d**3*sin(e + f*x)**3*cos(e + f*x)/(2*f) - 4*a*c*d**3*sin(e +
f*x)**2*cos(e + f*x)/f - 3*a*c*d**3*sin(e + f*x)*cos(e + f*x)**3/(2*f) - 8*a*c*d**3*cos(e + f*x)**3/(3*f) + 3*
a*d**4*x*sin(e + f*x)**4/8 + 3*a*d**4*x*sin(e + f*x)**2*cos(e + f*x)**2/4 + 3*a*d**4*x*cos(e + f*x)**4/8 - a*d
**4*sin(e + f*x)**4*cos(e + f*x)/f - 5*a*d**4*sin(e + f*x)**3*cos(e + f*x)/(8*f) - 4*a*d**4*sin(e + f*x)**2*co
s(e + f*x)**3/(3*f) - 3*a*d**4*sin(e + f*x)*cos(e + f*x)**3/(8*f) - 8*a*d**4*cos(e + f*x)**5/(15*f), Ne(f, 0))
, (x*(c + d*sin(e))**4*(a*sin(e) + a), True))

________________________________________________________________________________________